package cn.imnaer.service.rpc.userinfo.process;

import cn.imnaer.service.persistence.model.User;
import cn.imnaer.service.persistence.model.consts.USER;
import cn.imnaer.service.rest.view.model.SimpleUser;
import cn.imnaer.service.rpc.common.CommonRpcApiImpl;
import cn.imnaer.service.rpc.userinfo.dao.UserDaoImpl;

import org.bson.BSONObject;
import org.bson.BasicBSONObject;

public class UserManagerProcess extends CommonRpcApiImpl {

	public User getUserInfo(String key, String value) {
		BSONObject matcher = new BasicBSONObject();
		matcher.put(key, value);
		return UserDaoImpl.getInstance().findOne(matcher, null);
	}

	public User getUserById(String userId) {
		return UserDaoImpl.getInstance().findOneByPk(userId);
	}
}
